#include "GradDescent.h"



#include <iostream>
using namespace std;

#include <iomanip>

int main(){

	cout << "\n" << "Vectoren: " << endl;
	Vector2D v1(0.1,0);
	Vector2D v2(0,0.1);
	Vector2D v3(-0.5,-0.5);
	v1.print();
	v2.print();
	v3.print();
	cout << "\n\n";

	Func func;
	Sinc sinc;

	Func *fs = &func;
	GradDescent gdf(fs);
	

	cout << "\n" << "gdf: minimize" << endl;
	gdf.minimize(v1, 5).print();
	cout << "\n";
	gdf.minimize(v2, 5).print();
	cout << "\n";
	gdf.minimize(v3, 5).print();
	cout << "\n";


	cout << "\n" << "gdf: maximize" << endl;
	gdf.maximize(v1, 5).print();
	cout << "\n";
	gdf.maximize(v2, 5).print();
	cout << "\n";
	gdf.maximize(v3, 5).print();
	cout << "\n";


	fs = &sinc;
	GradDescent gds(fs);

	cout << "\n" << "gds: minimize" << endl;
	gds.minimize(v1, 5).print();
	cout << "\n";
	gds.minimize(v2, 5).print();
	cout << "\n";
	gds.minimize(v3, 5).print();
	cout << "\n";


	cout << "\n" << "gds: maximize" << endl;
	gds.maximize(v1, 5).print();
	cout << "\n";
	gds.maximize(v2, 5).print();
	cout << "\n";
	gds.maximize(v3, 5).print();
	cout << "\n";







	return 0;
}